<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Doctor Home Page</title>
<link href="officermain.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="officermain.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script src="../js/jquery-1.11.1.js"></script>
<script>
	var oldlist = null;

	$(document).ready(function() {

		$("#tabs1").click(function() {
			$("#tabs2List").slideUp("slow");
			$("#tabs3List").slideUp("slow");
			$("#tabs4List").slideUp("slow");
			$("#tabs5List").slideUp("slow");
			$("#tabs1List").slideToggle("slow");
		});

		$("#tabs2").click(function() {
			$("#tabs1List").slideUp("slow");
			$("#tabs3List").slideUp("slow");
			$("#tabs4List").slideUp("slow");
			$("#tabs5List").slideUp("slow");
			$("#tabs2List").slideToggle("slow");
		});

		$("#tabs3").click(function() {
			$("#tabs1List").slideUp("slow");
			$("#tabs2List").slideUp("slow");
			$("#tabs4List").slideUp("slow");
			$("#tabs5List").slideUp("slow");
			$("#tabs3List").slideToggle("slow");
		});

		$("#tabs4").click(function() {
			$("#tabs1List").slideUp("slow");
			$("#tabs2List").slideUp("slow");
			$("#tabs3List").slideUp("slow");
			$("#tabs5List").slideUp("slow");
			$("#tabs4List").slideToggle("slow");
		});
		
		$("#tabs5").click(function() {
			$("#tabs1List").slideUp("slow");
			$("#tabs2List").slideUp("slow");
			$("#tabs3List").slideUp("slow");
			$("#tabs4List").slideUp("slow");
			$("#tabs5List").slideToggle("slow");
		});		
		
		
		$("tab1button1").click( function() {
			$("#tab1button1page").fadeIn("slow");
		});

	});
</script>

</head>
<body>
	<div id="userinfo">
		<div id="useravatar">
			<img width="150px" height="120px" style="margin-top:15px" alt=""
				src="../images/avatar/Juli.jpg">
		</div>
		<div id="userdetails">
			<table>
				<tr>
					<td colspan="4" height="15px"></td>
				</tr>
				<tr>
					<td>Name:</td>
					<td width="200px"><input class="outbox" id="username"
						name="username" type="text" size="15" readonly="readonly" /></td>
					<td>Role:</td>
					<td><input class="outbox" id="role" name="role" type="text"
						size="15" readonly="readonly" /></td>
				</tr>
				<tr>
					<td colspan="4" height="15px"></td>
				</tr>
				<tr>
					<td>Date:</td>
					<td colspan="3"><input class="outbox" id="currdate"
						name="currdate" type="text" size="12" readonly="readonly" /></td>
				</tr>
			</table>
		</div>
		<div id="calendar"></div>
		<div id="signout"><a href="loginsystem.html">Sign Out</a></div>
	</div>

	<div id="tabs">
		<div id="tabstitle">
			<div id="tabs1" class="tabMenu">
				<a href="#">User Management</a>
			</div>
			<div id="tabs1List" class="tabsList">
				<div id="tab1button1" class="sublist">
					<a href="#">Register The User</a>
				</div>
				<div id="tab1button2" class="sublist">
					<a href="#">Modify The User</a>
				</div>
				<div id="tab1button3" class="sublist">
					<a href="#">Delete The User</a>
				</div>
			</div>
			<div id="tabs2" class="tabMenu">
				<a href="#">Hospital Management</a>
			</div>
			<div id="tabs2List" class="tabsList">
				<div id="tab2button1" class="sublist">
					<a href="#">Hospital Maintenance</a>
				</div>
			</div>
			<div id="tabs3" class="tabMenu">
				<a href="#">Drugs Management</a>
			</div>
			<div id="tabs3List" class="tabsList">
				<div id="tab3button1" class="sublist">
					<a href="#">Drugs Maintenance</a>
				</div>
			</div>
			<div id="tabs4" class="tabMenu">
				<a href="#">Schedule Management</a>
			</div>
			<div id="tabs4List" class="tabsList">
				<div id="tab4button1" class="sublist">
					<a href="#">Schedule Maintenance</a>
				</div>
			</div>			
			<div id="tabs5" class="tabMenu">
				<a href="#">Doctors List</a>
			</div>
			<div id="tabs5List" class="tabsList">
				<div id="tab5button1" class="sublist">
					<a href="#">Doctors List</a>
				</div>
			</div>
		</div>
		<div id="tabsbody">
			<div id="tab1button0page" class="tabpage" style="z-index: 1"></div>
			<div id="tab1button1page" class="tabpage">
				<div id="adduserfrm">
					<form id="registeruserform" method="post" action="../RegisterUserServlet">
						<table class="adduserinfo">
							<tr>
								<td><label> Role: <select name="roleType"
										id="roleType"></select>
								</label></td>
								<td><label> First Name: <input type="text" name="fname"
										id="fname" />
								</label></td>
								<td><label> Last Name: <input type="text" name="lname"
										id="lname" />
								</label></td>
							</tr>
							<tr>
								<td><label> Sex: <select name="sexType"
										id="sexType">
											<option value="1">Male</option>
											<option value="2">Female</option>
									</select>
								</label></td>
								<td><label> BirthDay: <input type="text" name="birthday"
										id="birthday" size="10" />
								</label></td>
								<td><label> Phone: <input type="text" id="phone" name="phone"/>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Email: <input type="text"
										id="email" name="email" size="40" />
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Address: <textarea
											name="address" id="address"></textarea>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Hospital: <select name="hospitalType"
										id="hospitalType"></select>
								</label></td>
							</tr>
							<tr>
								<td colspan="3">
									<hr />
								</td>
							</tr>
							<tr>
								<td colspan="3"><label> User ID: <input type="text"
										id="userid" readonly="readonly" size="30" />
								</label></td>
							</tr>
						</table>

						<input type="button" class="mybutton" id="register"
							value="Register" onclick="sendRegisterUserRequest()" /> <input type="reset"
							class="mybutton" id="cancel" value="Cancel" onclick="initRegisterUserPage()"/>
					</form>
				</div>
			</div>
			<div id="tab1button2page" class="tabpage">
				<div id="modiuserfrm">
					<form id="modifyuserform" method="post"
						action="../ModifyUserServlet">
						<table class="modiuserinfo">
							<tr>
								<td><label> User ID: <input type="text"
										id="muserid" name="userid" size="30" />
								</label></td>
								<td colspan="2">
									<input type="button" class="myspecialbutton" id="mquery" value="Go" 
									onclick="sendQueryMUserRequest()" /> 									
								</td>
							</tr>	
							<tr>
								<td colspan="3">
									<hr />
								</td>
							</tr>												
							<tr>
								<td><label> Role: <select name="roleType"
										id="mroleType">											
									</select>
								</label></td>
								<td><label> First Name: <input type="text"
										id="mfname" name="fname" class="outinfo"/>
								</label></td>
								<td><label> Last Name: <input type="text"
										id="mlname" name="lname" class="outinfo"/>
								</label></td>
							</tr>
							<tr>
								<td><label> Sex: <select name="sexType"
										id="msexType">
											<option value="1">Male</option>
											<option value="2">Female</option>										
									</select>
								</label></td>
								<td><label> BirthDay: <input type="text"
										id="mbirthday" name="birthday" size="10" class="outinfo"/>
								</label></td>
								<td><label> Phone: <input type="text" id="mphone" name="phone" class="outinfo" />
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Email: <input type="text"
										id="memail" name="email" size="40" class="outinfo"/>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Address: <textarea
										name="address" id="maddress" class="outinfo"></textarea>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Hospital: <select name="hospitalType"
										id="mhospitalType" >
									</select>
								</label></td>
							</tr>
						</table>	
											
						<input type="button" class="mybutton" id="modify" value="Modify" 
							onclick="sendModifyUserRequest()" /> 
						<input type="button" class="mybutton" id="mcancel" value="Cancel" 
							onclick="cancelModifyUser()" />
					</form>
				</div>			
			</div>
			<div id="tab1button3page" class="tabpage">
				<div id="deluserfrm">
					<form id="deleteuserform" method="post"
						action="../DeleteUserServlet">
						<table class="deluserinfo">
							<tr>
								<td><label> User ID: <input type="text"
										id="duserid" name="userid" size="30" />
								</label></td>
								<td colspan="2">
									<input type="button" class="myspecialbutton" id="dquery" value="Go" 
									onclick="sendQueryDUserRequest()" /> 									
								</td>
							</tr>	
							<tr>
								<td colspan="3">
									<hr />
								</td>
							</tr>												
							<tr>
								<td><label> Role: <select name="roleType"
										id="droleType">
									</select>
								</label></td>
								<td><label> First Name: <input type="text"
										id="dfname" name="fname" class="outinfo"/>
								</label></td>
								<td><label> Last Name: <input type="text"
										id="dlname" name="lname" class="outinfo"/>
								</label></td>
							</tr>
							<tr>
								<td><label> Sex: <select name="sexType"
										id="dsexType">
											<option value="1">Male</option>
											<option value="2">Female</option>	
									</select>
								</label></td>
								<td><label> BirthDay: <input type="text"
										id="dbirthday" name="birthday"  size="10" class="outinfo"/>
								</label></td>
								<td><label> Phone: <input type="text" id="dphone" name="phone" class="outinfo" />
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Email: <input type="text"
										id="demail" name="email" size="40" class="outinfo"/>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Address: <textarea
											name="address" id="daddress" class="outinfo"></textarea>
								</label></td>
							</tr>
							<tr>
								<td colspan="3"><label> Hospital: <select name="hospitalType"
										id="dhospitalType" >
									</select>
								</label></td>
							</tr>
						</table>	
											
						<input type="button" class="mybutton" id="delete" value="Delete" onclick="sendDeleteUserRequest()" /> 
						<input type="reset" class="mybutton" id="dcancel" value="Cancel" onclick="cancelDeleteUser()" />
					</form>
				</div>			
			</div>
			<div id="tab2button1page" class="tabpage">
				<div id="div_hospital_table" style="overflow:scroll;height:710px;"></div>
				<input type="button" class="mybutton" id="hregister"
							value="Register" onclick="showHospitalMaintance('add')" />		
			</div>
			<div id="tab3button1page" class="tabpage">
				<div id="div_drug_table" style="overflow:scroll;height:710px;"></div>
				<input type="button" class="mybutton" id="dregister"
							value="Register" onclick="showDrugMaintance('add')" />
			</div>
			<div id="tab4button1page" class="tabpage">
				<fieldset id="div_serach" >
					<legend>Search:</legend>
					<form id="scd_search_form" method="post" action="../QueryScheduleListServlet">	
						<table class="search_schedule">		
							<tr>
								<td><label> Hospital: <select name="scdHospitalType" id="scd_HospitalType" onchange="QueryScheduleList()"></select></label></td>
								<td>&nbsp;&nbsp;&nbsp;</td>
								<td><label> Doctor: <select name="scdDoctorName" id="scd_DoctorName" onchange="QueryScheduleList()"></select></label></td>
								<td>&nbsp;&nbsp;&nbsp;</td>
								<td colspan="3"><label> Month: <select name="scdDateYear" id="scd_DateYear" >
								</select><select name="scdDateMonth" id="scd_DateMonth" ></select></label></td>														
							</tr>	
							<tr>
								<td><label> Date From: <input type="text" id="scd_StartDate" name="scdStartDate" size="15" /></label></td>								
								<td>&nbsp;&nbsp;&nbsp;</td>
								<td><label> Date To: <input type="text" id="scd_EndDate" name="scdEndDate" size="15" /></label></td>	
								<td>&nbsp;&nbsp;&nbsp;</td>
								<td><label> A.M./P.M.: <select name="scdHalfDay" id="scd_HalfDay" >
								<option value='0'>A.M.</option>
								<option value='1'>P.M.</option>
								<option value='2'>A.M. &amp; P.M.</option>
								</select></label></td>	
								<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
								<td><input type="button" class="mybutton2" id="scd_MakeSchedule"
										value="Make Schedule" onclick="sendMakeScheduleRequest()"/> </td>						
							</tr>					
						</table>
					</form>
				</fieldset>		
				<div id="div_schedule_list">			
					<div id="div_schedule_table" style="overflow:scroll;height:550px;"></div>
				</div>
			</div>	
			<div id="tab5button1page" class="tabpage">
				<div id="div_DoctorList_table" style="overflow:scroll;height:750px;"></div>
			</div>														
		</div>
	</div>
	
	<div id="hpt_filter_div">
		<div id="div_hpt_maintenance" >
			<form id="hpt_maintenance_form" method="post"
				action="">
				<table class="hpt_info">
					<tr>
						<td><label> Hospital Name: <input type="text"
								id="hptinfo_name" name="name" size="40" class="hpt_input"/>
						</label></td>		
						<td><input type="hidden"
								id="hptinfo_id" name="hospitalid" size="10" class="hpt_input"/>
						</td>														
					</tr>
					<tr>
						<td colspan="2"><label> Address: <textarea
									name="address" id="hptinfo_address" class="hpt_input"></textarea>
						</label></td>
					</tr>
					<tr>
						<td colspan="2"><label> Post Code: <input type="text"
								id="hptinfo_zcode" name="zcode" size="7" maxlength="7" class="hpt_input"/>
						</label></td>
					</tr>							
					<tr>
						<td><label> Tele: <input type="text" id="hptinfo_phone" name="phone" size="15" class="hpt_input"/>
						</label></td>	
						<td><label> Fax: <input type="text" id="hptinfo_fax" name="fax" size="15" class="hpt_input"/>
						</label></td>								
					</tr>						
					<tr>
						<td colspan="2"><label> Email: <input type="text"
								id="hptinfo_email" name="email" size="40" class="hpt_input"/>
						</label></td>
					</tr>
				</table>
				<input type="hidden" class="mybutton" id="hptinfo_register"
					value="OK" onclick="sendRegisterHospitalRequest()"/> 
				<input type="hidden" class="mybutton" id="hptinfo_modify"
					value="Modify" onclick="sendModifyHospitalRequest()" /> 
				<input type="hidden" class="mybutton" id="hptinfo_delete"
					value="Delete" onclick="javascript:if(confirm('Are you sure to delete this record?')) sendDeleteHospitalRequest()" /> 							
				<input type="button" class="mybutton" id="hptinfo_cancel" 
					value="Cancel" onclick="cancelHospitalMaintance()" />
			</form>					
		</div>
	</div>
	<div id="drug_filter_div">
		<div id="div_drug_maintenance" >
			<form id="drug_maintenance_form" method="post"
				action="">
				<table class="drug_info">
					<tr>
						<td><label> Drug Name: <input type="text"
								id="druginfo_name" name="name" size="40"/>
						</label></td>		
						<td><input type="hidden"
								id="druginfo_id" name="drugid" size="10" />
						</td>														
					</tr>
					<tr>
						<td colspan="2"><label> Specification: <textarea
									name="specification" id="druginfo_spec" class="outinfo"></textarea>
						</label></td>
					</tr>
				</table>

				<input type="hidden" class="mybutton" id="druginfo_register"
					value="OK" onclick="sendRegisterDrugRequest()"/> 
				<input type="hidden" class="mybutton" id="druginfo_modify"
					value="Modify" onclick="sendModifyDrugRequest()" /> 					
				<input type="hidden" class="mybutton" id="druginfo_delete"
					value="Delete" onclick="javascript:if(confirm('Are you sure to delete this record?')) sendDeleteDrugRequest()" /> 							
				<input type="button" class="mybutton" id="druginfo_cancel" 
					value="Cancel" onclick="cancelDrugMaintance()" />
			</form>					
		</div>
	</div>	
</body>
</html>